package com.bruce.demo2.patterns.demo1.creational.demo02.factoryMethod.demo4;

/**
 * @PROJECT_NAME design_patterns
 * @DESCRIPTION 咖啡店
 * @AUTHOR CNBruceLee
 * @DATE 2021/7/10 18:16
 */
public class CoffeeStore {
    public Coffee orderCoffee(String type) throws Exception {
        //调用生产咖啡的方法
        Coffee coffee = SimpleCoffeeFactory.createCoffee(type);
        //添加配料
        coffee.addMilk();
        coffee.addSugar();
        return coffee;
    }
}
